package com.yzh.oop1;

/**
 * @author 于振晗
 * @title: Test
 * @description: TODO 测试重写对象toString
 * @date 2020年08月26日
 * @path com.yzh.oop1
 */
public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("red",5);
        dog.setNickName("灰灰");
        System.out.println(dog.toString());
        Dog dog2 = new Dog("red",5);
        dog2.setNickName("test");
        System.out.println(dog2.toString());
        System.out.println(dog.equals(dog2));
    }
}
